package cn.store.service;

import cn.store.domain.Product;
import cn.store.domain.PageModel;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface ProductService {

	List<Product> findHots()throws Exception;

	List<Product> findNews()throws Exception;

	Product findProductByPid(String pid)throws Exception;

	PageModel findProductsByCidWithPage(String cid, int curNum)throws Exception;

	PageModel findAllProductsWithPage(int curNum, Map<String,Object> searchWords)throws Exception;

	void saveProduct(Product product)throws Exception;;

	void updateProduct(Product product) throws SQLException;


	int deleteProduct(String pid) throws SQLException;

}
